﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopItemSearch")]
    public class ItemSearch : BaseObject
    {
        //begin
        public ItemSearch()
        {}
        public ItemSearch(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        [Association("ItemSearchItems", typeof(Item)), Aggregated]
        public XPCollection<Item> Items
        {
            get
            {
                return GetCollection<Item>("Items");
            }
        }
        [Association("ItemSearchItemCategories", typeof(ItemCategory)), Aggregated]
        public XPCollection<ItemCategory> ItemCategories
        {
            get
            {
                return GetCollection<ItemCategory>("ItemCategories");
            }
        }
        //end
    }
}
